<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>工程合同详情</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../../../resources/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../resources/css/style.css">
    <style>
        .details ul li {width: 50%;float: left;}
        .layui-table thead th{text-align: left;}
        .layui-table td{text-indent: 1rem; font-size: 12px; color: #333;}
        .detailed{background-color: #FFF; font-size: 12px; color: #333333; line-height: 24px;margin-top:5px;}
        /*.details ul,li{list-style: inherit;}*/
        .detailed p:after {
            content: "\0020";
            display: block;
            height: 0;
            clear: both;
        }
        .detailed p:before {content: "● "; color: #e3e3e3; font-size: 12px; margin-right: 5px; float: left;}
        .detailed .detaL{width: 120px;display: inline-block; float: left;    padding-right: 20px;}
        .detailed .dataR{display: inline-block;float: left;}
        .detailed p{margin-bottom: 10px;}

        .detailedfoot ul {display: flex;justify-content: space-around;}
        .layui-table thead th{text-align: left;}

        .layui-table td{text-indent: 1rem; font-size: 12px; color: #333;}
        table tbody tr td{text-align: left;}
        .maskmain table td, th{text-align: left;}
        .detailedfoot{padding: 15px 35px;height:50%;overflow: auto;}
        .engineering{display: inline-block;float: left; padding-right:15px;margin-left: -10px;height: 400px;margin-bottom:
                20px; width: 100%;}
        /*.details{height: 20%;}*/
        .titles{height: 10%;line-height: 40px;}
        .detailwarp{padding-left:22px;}
        @media screen and (max-width: 750px){
            .MOVE_list {height: 180px;padding: 16px 0;background-color: #F7F7F7;}
            #LAY_demo1 li{border-bottom: 3px solid #DBE7FF;}
            .MOVE_detailsBOT{border-top: 2px solid #EBEBEB;}
        }
        /*.detaL,.dataR{display: block;float: none;}*/
        .dataR{text-indent: 1em;}
        .xiangqing tr th{width: 50px;}
        .tables_MOVE{overflow-x: auto;}
        .tables_MOVE table thead{width: 200%!important;display: flex;}
    </style>
</head>

<body>
<form class="layui-form layui-form-pane" action="" >
    <button class="layui-btn _PC" type="button" onclick="history.back(-1);" style="margin-left: 24px;"><i class="layui-icon">
    </i></button>
    <div class="detailwarp _PC">
        <div class="engineering">
            <!--<div class="titles" names="1">22</div>-->
            <!--<div class="details">-->
                  <!--<ul>-->
                        <!--<li><span class='detaL'>项目名称：</span><span class="dataR"></span></li>-->
                        <!--<li><span class='detaL'>申请人：</span><span class="dataR"></span></li>-->
                        <!--<li><span class='detaL'>创建时间：</span><span class="dataR"></span></li>-->
                        <!--<li><span class='detaL'>供货时间：</span><span class="dataR"></span></li>-->
                        <!--<li><span class='detaL'>收货地址：</span><span class="dataR"></span></li>-->
                  <!--</ul>-->
            <!--</div>-->
            <!--<div class="detailed">-->
            <!--</div>-->
            <!--<div class="detailedfoot">-->
                <!--<table>-->
                    <!--<thead class="detailedfoot_thea">-->
                        <!--<th>材料名称</th>-->
                        <!--<th>材料规格</th>-->
                        <!--<th>申请数量</th>-->
                        <!--<th>审核状态</th>-->
                    <!--</thead>-->
                    <!--<tbody>-->
                        <!--<tr>-->
                            <!--<td></td>-->
                            <!--<td></td>-->
                            <!--<td></td>-->
                            <!--<td></td>-->
                        <!--</tr>-->
                    <!--</tbody>-->
                <!--</table>-->
            <!--</div>-->

        </div>
    </div>
    <div class="_MOVE">
        <div class="MOVE_title">
            <div class="site-tree-mobile layui-show houtui" onclick="history.back(-1);">
                <i class="layui-icon">&#xe603;</i>
            </div>
            <span class="zhanwei"></span>
            <p class="MOVE_biaoti">工程材料需求申请单</p>
            <span class="shousuo"></span>

        </div>
        <div class="querylist">

        </div>
        <div class="MOVE_main">
            <ul class="flow-default" id="LAY_demo1">

                <!--<li>-->
                    <!--<div class="MOVE_details">-->
                        <!--<div class="MOVE_list">-->
                            <!--<p><span class="MOVE_listL">项目名称：</span><span class="MOVE_listR">厂北路-郑上路</span></p>-->
                            <!--<p><span class="MOVE_listL">申请人：</span><span class="MOVE_listR">郑州市金水区  </span></p>-->
                            <!--<p><span class="MOVE_listL">创建时间：</span><span class="MOVE_listR">2017-10-13 13:02:57</span></p>-->
                            <!--<p><span class="MOVE_listL">供货时间：</span><span class="MOVE_listR">等待签收</span></p>-->
                            <!--<p><span class="MOVE_listL">收货地址：</span><span class="MOVE_listR">等待签收</span></p>-->
                        <!--</div>-->

                    <!--</div>-->
                    <!--<div class="MOVE_detailsBOT">-->
                        <!--<p><span class="MOVE_listL">材料名称：</span><span class="MOVE_listR">厂北路-郑上路</span></p>-->
                        <!--<p><span class="MOVE_listL">规格：</span><span class="MOVE_listR">郑州市金水区  </span></p>-->
                        <!--<p><span class="MOVE_listL">数量：</span><span class="MOVE_listR">郑州市金水区  </span></p>-->
                        <!--<p><span class="MOVE_listL">备注：</span><span class="MOVE_listR">郑州市金水区  </span></p>-->
                    <!--</div>-->

                <!--</li>-->
                <!--<li>-->
                <!--<div class="MOVE_details">-->
                <!--<div class="MOVE_numbers">-->
                <!--<span class="MOVE_numberson">201702</span>-->
                <!--<span class="layui-badge MOVE_statetow">未完成</span>-->
                <!--</div>-->
                <!--<div class="MOVE_list">-->
                <!--<p><span class="MOVE_listL">工程名称：</span><span class="MOVE_listR">厂北路-郑上路厂北路-郑上路厂北路-郑上路厂北路-郑上路厂北路-郑上路厂北路-郑上路厂北路-郑上路厂北路-郑上路厂北路-郑上路厂北路-郑上路</span></p>-->
                <!--<p><span class="MOVE_listL">供货地址：</span><span class="MOVE_listR">郑州市金水区  </span></p>-->
                <!--<p><span class="MOVE_listL">供货时间：</span><span class="MOVE_listR">2017-10-13  13:02:57</span></p>-->
                <!--<p><span class="MOVE_listL">签收状态：</span><span class="MOVE_listR">等待签收</span></p>-->
                <!--</div>-->

                <!--</div>-->

                <!--</li>-->
            </ul>
        </div>

    </div>


</form>

<script src="../../../resources/layui/layui.js" charset="utf-8"></script>
<script src="../../../resources/js/style.js"></script>
<script src="../../../resources/js/api.js"></script>
<script>
    layui.use(['form', 'layedit', 'laydate','flow'], function() {
        var form = layui.form
            , layer = layui.layer
            , layedit = layui.layedit
            , laydate = layui.laydate;
        var brttrtArray = {};   //新建一个对象  用以数据去重

        ajaxs('/api/material/loadMatFeedPic.do','post',{'type':'b','feed_code':sessionStorage.xiangqing,'p':getCookie('yanzheng')}, function
            (data) {
            var datas=data.data;
            //console.log(datas)
            //console.log(datas.length)
            for(var i=0;i<datas.length;i++){
                if(i==0){
                    $('.engineering').append('<div class="titles" names="1">'+datas[i].eppName+'</div>\n' +
                        '            <div class="details">\n' +
                        '                  <ul>\n' +
                        '                        <li><span class=\'detaL\'>工程名称：</span><span class="dataR">'+datas[i].eppName+'('+datas[i].eppStaEnd+')'+'</span></li>\n' +
                        '                        <li><span class=\'detaL\'>申请人：</span><span class="dataR">'+datas[i].feed_sqr+'</span></li>\n' +
                        '                        <li><span class=\'detaL\'>供货时间：</span><span class="dataR">'+datas[i].supply_Time+'</span></li>\n' +
                        '                        <li><span class=\'detaL\'>收货地址：</span><span class="dataR">'+datas[i].eppStaEnd+'</span></li>\n' +
                        '                        <li><span class=\'detaL\'>收料单位：</span><span class="dataR">'+datas[i].compName1+'</span></li>\n' +
                        '                  </ul>\n' +
                        '            </div>\n' +
                        '            <div class="detailed">\n' +
                        '            </div>\n' +
                        '            <div class="detailedfoot">\n' +
                        '                <table class="layui-table">\n' +
                        '                    <thead class="detailedfoot_thea">\n' +
                        '                        <th>材料名称</th>\n' +
                        '                        <th>材料规格</th>\n' +
                        '                        <th>计量单位</th>\n' +
                        '                        <th>申请数量</th>\n' +
                        '                        <th>审核状态</th>\n' +
                        '                        <th>审核意见</th>\n' +
                        '                    </thead>\n' +
                        '                    <tbody>\n' +
                        '                    </tbody>\n' +
                        '                </table>\n' +
                        '            </div>')
                }
                switch (datas[i].validate){
                    case -1:
                        datas[i].validate='等待审核';
                        break;
                    case 0:
                        datas[i].validate='审核通过';
                        break;
                    case 1:
                        datas[i].validate='审核不通过';
                        break;
                    case 2:
                        datas[i].validate='已发货';
                        break;
                }
                datas[i].valOpition?datas[i].valOpition=datas[i].valOpition:datas[i].valOpition='';
                $('.layui-table tbody').append('<tr>' +
                        '                           <td>'+datas[i].mat_Name+'</td>' +
                        '                           <td>'+datas[i].mat_Spec+'</td>' +
                '                                   <td>'+datas[i].mat_bit+'</td>' +
                '                               <td>'+datas[i].feed_Num+'</td>' +
                    '                               <td>'+datas[i].validate+'</td>' +
                    '                               <td>'+datas[i].valOpition+'</td>' +
                    '                           </tr>')

            }


        })
    })
</script>
</body>
</html>